package com.sw.youvote.client.services;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.sw.youvote.client.QuizListGUI;


public class ImageServiceDelegate {
	   private ImageServiceAsync imageService = GWT.create(ImageService.class);
	   private QuizListGUI gui;
	   
	   public void getImage(final String id) {
		   imageService.getImage(id, new AsyncCallback<byte[]> () {
               public void onFailure(Throwable caught) {
                   //gui.service_eventGetImageFailed(caught);
               }
   
               public void onSuccess(byte[] result) {
                   //gui.getContentArea().service_eventGetImageFromService(result);
                   
               }
		   }//end of inner class
		   );//end of listQuizs method call.
		   
	   }
	   
	   public void getImageURL(final String id) {
		   imageService.getImageURL(id, new AsyncCallback<String> () {
               public void onFailure(Throwable caught) {
                   //gui.service_eventGetImageURLFailed(caught);
               }
   
               public void onSuccess(String result) {
                   //gui.getContentArea().service_eventGetImageURLFromService(result);
                   
               }
		   }//end of inner class
		   );//end of listQuizs method call.
		   
	   }
}
